<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dalin.system.dao.${entityName}Mapper">
    <select id="list${entityName}s" parameterType="com.dalin.system.pojo.request.${entityName}Request"
            resultType="com.dalin.system.pojo.entity.${entityName}Entity">
        SELECT * FROM ${tableName}
        <where>
            <if test="dbName != null and dbName != ''">
                AND db_name LIKE CONCAT('%', #{dbName}, '%')
            </if>
            <if test="remark != null and remark != ''">
                AND remark LIKE CONCAT('%', #{remark}, '%')
            </if>
        </where>
        order by id desc
    </select>

    <!-- 其他映射语句 -->
    <insert id="batchInsert"
            parameterType="java.util.List">
        INSERT INTO ${tableName} (${columns})
        VALUES
        <foreach collection="list" item="item" separator=",">
            (${values})
        </foreach>
    </insert>
</mapper>